<?php
/**
 * 测试模板 
 *
 * @filesource testView.php
 * @package DsTemplate
 * @subpackage 
 * @version $id: 0.1, utf8, Fri Jan  1 15:49:56 CST 2010
 * @author LD King <kldscs[at]gmail.com>
 * @copyright Copyleft (D.) 2007 - 2009 MiFunny China Inc.
 * @link http://mifunny.info/
 * @example 
 *   
 */
error_reporting(E_ALL);
ob_start();
define('DS', DIRECTORY_SEPARATOR); //目录分隔符
$tpdir = dirname(dirname(dirname(__FILE__)));
require_once $tpdir.DS.'DsTemplate.class.php';

$n = null;

$v = new DsTemplate();
$v->abc = 'ABC';
echo $n.$v->abc;

$template = 'testTemplate.php';

//$v->display('testTemplate.php');
$f = $v->fetch('testTemplate.php');
echo '<br/>view length: '. strlen($f);
echo '<br/>--->'.$f.'<---<br/>';
echo '<br/><br/>static method: --->';
DsTemplate::show($template, array('defg'=>"CD\'E\'FG") );
echo '<---'. $errno ;
?>
<br />

<?php
$p = "天国/不是/我本支百世";
echo str_replace('/', DS,  $p);

$n = null;
$vn = !empty($n) ? $n.DS : 'NULL';
echo '<br/>vn = '.$vn;


?>
